Skip to content

docs: Add guide for running CI tests locally with tox-lsr#796

Merged
richm merged 1 commit intolinux-system-roles:mainfrom
liangwen12year:update_docs
Jul 8, 2025
Merged

docs: Add guide for running CI tests locally with tox-lsr#796
richm merged 1 commit intolinux-system-roles:mainfrom
liangwen12year:update_docs

Conversation

@liangwen12year
Copy link
Copy Markdown
Contributor

@liangwen12year liangwen12year commented Jul 7, 2025

Enhancement:

Reason:

Result:

Issue Tracker Tickets (Jira or BZ if any):

Summary by Sourcery

Documentation:

  • Introduce a new "Running CI Tests Locally" section in contributing.md with step-by-step instructions for installing dependencies (EPEL, qemu inventory script, tox, tox-lsr) and running qemu-based tests via tox-lsr

@sourcery-ai
Copy link
Copy Markdown

sourcery-ai Bot commented Jul 7, 2025

Reviewer's Guide

Introduces a new “Running CI Tests Locally” section in contributing.md that guides developers through using tox-lsr and QEMU to execute CI tests on their local machines.

File-Level Changes

Change Details Files
Add local CI test execution guide
  • Insert section header and overview for tox-lsr with QEMU
  • Detail enabling EPEL repository on RHEL/CentOS
  • Provide alternate installation for standard inventory script
  • Add instructions for installing tox via package manager or pip
  • Include steps to install tox-lsr from the repository
  • Show example command for running QEMU-based role tests
contributing.md

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Copy Markdown

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @liangwen12year - I've reviewed your changes - here's some feedback:

  • Consider pinning the tox-lsr installation to a stable release tag instead of @main to avoid breakage when upstream changes occur.
  • It may be helpful to note that qemu-based tests require virtualization tools (e.g. qemu-system-x86_64) and appropriate permissions or root access to launch VMs.
  • The yum/dnf and pip install commands likely need sudo; consider explicitly showing when to prefix with sudo to prevent permission issues.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Consider pinning the tox-lsr installation to a stable release tag instead of `@main` to avoid breakage when upstream changes occur.
- It may be helpful to note that qemu-based tests require virtualization tools (e.g. `qemu-system-x86_64`) and appropriate permissions or root access to launch VMs.
- The yum/dnf and pip install commands likely need `sudo`; consider explicitly showing when to prefix with `sudo` to prevent permission issues.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@codecov
Copy link
Copy Markdown

codecov Bot commented Jul 7, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 43.25%. Comparing base (1b57520) to head (ada9434).
Report is 31 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #796      +/-   ##
==========================================
+ Coverage   43.11%   43.25%   +0.13%     
==========================================
  Files          12       12              
  Lines        3124     3121       -3     
==========================================
+ Hits         1347     1350       +3     
+ Misses       1777     1771       -6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown
Collaborator

@spetrosi spetrosi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're missing a step about downloading config:
Download the config file to ~/.config/linux-system-roles.json from here

Comment thread contributing.md Outdated
5. Assuming you are in a git clone of a role repo which has a tox.ini file - you can use e.g.

```bash
tox -e qemu-ansible-core-2.14 -- --image-name rhel-9-2 tests/tests_default.yml
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Upstream users wouldn't be able to use rhel, change to centos-9

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed it to centos-9, thanks!

@richm
Copy link
Copy Markdown
Contributor

richm commented Jul 7, 2025

@liangwen12year liangwen12year force-pushed the update_docs branch 4 times, most recently from 6ea76b1 to 9df2ced Compare July 8, 2025 19:54
Signed-off-by: Wen Liang <liangwen12year@gmail.com>
@liangwen12year
Copy link
Copy Markdown
Contributor Author

@richm richm merged commit a384d5b into linux-system-roles:main Jul 8, 2025
30 of 31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants